package org.huntaway.po.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the unfinished table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="unfinished"
 */

public abstract class BaseUnfinished  implements Serializable {

	public static String REF = "Unfinished";
	public static String PROP_NAME = "Name";
	public static String PROP_INTRODUCTION = "Introduction";
	public static String PROP_AUTHOR = "Author";
	public static String PROP_ID = "Id";
	public static String PROP_OPERATEDATE = "Operatedate";
	public static String PROP_REMARK = "Remark";
	public static String PROP_CODE = "Code";
	public static String PROP_CREATEDATE = "Createdate";


	// constructors
	public BaseUnfinished () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseUnfinished (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.String code;
	private java.lang.String name;
	private java.lang.String remark;
	private java.lang.String introduction;
	private java.lang.String author;
	private java.util.Date createdate;
	private java.util.Date operatedate;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: code
	 */
	public java.lang.String getCode () {
		return code;
	}

	/**
	 * Set the value related to the column: code
	 * @param code the code value
	 */
	public void setCode (java.lang.String code) {
		this.code = code;
	}



	/**
	 * Return the value associated with the column: name
	 */
	public java.lang.String getName () {
		return name;
	}

	/**
	 * Set the value related to the column: name
	 * @param name the name value
	 */
	public void setName (java.lang.String name) {
		this.name = name;
	}



	/**
	 * Return the value associated with the column: remark
	 */
	public java.lang.String getRemark () {
		return remark;
	}

	/**
	 * Set the value related to the column: remark
	 * @param remark the remark value
	 */
	public void setRemark (java.lang.String remark) {
		this.remark = remark;
	}



	/**
	 * Return the value associated with the column: introduction
	 */
	public java.lang.String getIntroduction () {
		return introduction;
	}

	/**
	 * Set the value related to the column: introduction
	 * @param introduction the introduction value
	 */
	public void setIntroduction (java.lang.String introduction) {
		this.introduction = introduction;
	}



	/**
	 * Return the value associated with the column: author
	 */
	public java.lang.String getAuthor () {
		return author;
	}

	/**
	 * Set the value related to the column: author
	 * @param author the author value
	 */
	public void setAuthor (java.lang.String author) {
		this.author = author;
	}



	/**
	 * Return the value associated with the column: createdate
	 */
	public java.util.Date getCreatedate () {
		return createdate;
	}

	/**
	 * Set the value related to the column: createdate
	 * @param createdate the createdate value
	 */
	public void setCreatedate (java.util.Date createdate) {
		this.createdate = createdate;
	}



	/**
	 * Return the value associated with the column: operatedate
	 */
	public java.util.Date getOperatedate () {
		return operatedate;
	}

	/**
	 * Set the value related to the column: operatedate
	 * @param operatedate the operatedate value
	 */
	public void setOperatedate (java.util.Date operatedate) {
		this.operatedate = operatedate;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof org.huntaway.po.Unfinished)) return false;
		else {
			org.huntaway.po.Unfinished unfinished = (org.huntaway.po.Unfinished) obj;
			if (null == this.getId() || null == unfinished.getId()) return false;
			else return (this.getId().equals(unfinished.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}